// кнопка поиска
$("#button-submit").click(FormSend);
// открывающиеся пункты
var slide_elems = ["price", "type", "nfaz", "act_power", "invert", "welding", "eng_makers", "fuelvol", "fullpower", "weight", "offtime", "start_m", "start_e", "start_a", "gearpower", "ncyl", "ntakt", "nturns", "froz", "fueltype", "fuelrate", "ufuelrate", "n380", "exit12", "n220", "timework", "gearlife", "gentype", "brusgen", "saveclass", "actpower", "maxpower", "fullpower", "curstrength", "noiselevel", "nosound", "wheels", "muffler", "overloadsafe", "voltmeter", "hourmeter", "height", "depth", "width", "weight", "vgear"];
for(var i = 0; i < slide_elems.length; i++) {
  if($("#s-" + slide_elems[i]).obj()) {
    $("#s-" + slide_elems[i]).click(function() {
      var elem = $("#" + this.id + "_b");
      if(elem.isShow()) {elem.hide();} 
      else {elem.show();}
    });
  }
}
// производители 1
if ($("#all-makers1").obj() != null) {
  $("#all-makers1").click(function() {
    var elem = $("#makers-all_left");
    if(elem.isShow()) {
      elem.hide();
      $("#all-makers1").html("Все производители");
    } else {
      elem.show();
      $("#all-makers1").html("Популярные производители");
    }
  });
}
// производители 2
$("#all-makers2_click").click(function() {
  var elem = $("#makers-all_main");
  if(elem.isShow()) {
    elem.hide();
    $("#all-makers2").html("Популярные производители");
    $("#all-makers2_click").html("все");
  } else {
    elem.show();
    $("#all-makers2").html("Все производители");
    $("#all-makers2_click").html("популярные");
  }
});
